<!doctype html>
<!--
/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2014 Adobe Inc.
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received this file from a source other than Adobe,
* then your use, modification, or distribution of it requires the prior
* written permission of Adobe. 
**************************************************************************/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Websocket Server</title>
  <style>

  html, body {
    width: 100%;
    height: 100%;
    border: 0px;
    margin: 0px;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  textarea {
    width: 100%;
    height: 100%;
    padding: 5px;
    margin: 0px;
    border: 0px;
    color: #ddd;
    font-family: "Courier New", Courier, monospace;
    font-weight: 200;
    font-size: 22px;
    background-color: #333;
  }

  textarea:focus {
    outline: 0px;
  }

  </style>
</head>
<body>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.1/socket.io.slim.js"></script>
  <textarea id="input" autofocus="autofocus" onkeypress="keypress(event)"></textarea>
  <script>
    var input = document.getElementById("input");
    var socket = io.connect('http://localhost:8080');
    input.onkeypress = function(event) {
      if (event.keyCode === 13) {
        socket.emit("fromWebsite", input.value);
        return false;
      }
    };
  </script>
</body>
</html>